﻿using System;
using System.Collections.Generic;
using LitJson;
/// <summary>
///一个账号一天的统计信息
/// </summary>
public class AccountStatistics
{
	public AccountStatistics()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    
      /// <summary>
    /// 微博账号的ID
    /// </summary>
    public string AccountName;

     /// <summary>
    /// 发微博的条数
    /// </summary>
    public int StatusCount;


    /// <summary>
    ///微博被转发的次数
    /// </summary>
    public int RepostCount;


    /// <summary>
    /// 微博被评论的次数
    /// </summary>
    public int CommentsCount;



    /// <summary>
    /// 账号粉丝数
    /// </summary>
    public int FollowersCount;

    /// <summary>
    /// 统计数据的时间
    /// </summary>
    public DateTime Date;

    public string toJson()
    {
        return string.Format("{ \"AccountName\":{0}, \"StatusCount\":{1}, \"RepostCount\": {2}, \"CommentsCount\":{3}, \"FollowersCount\": {4}, \"Date\": \" {5} \" }", 
                                    AccountName, StatusCount, RepostCount, CommentsCount, FollowersCount, Date.ToString());
    }

    public JsonData toJsonObj()
    {
        JsonData json = new JsonData();
        json.SetJsonType(JsonType.Object);

        json["AccountName"] = AccountName;
        json["StatusCount"] = StatusCount;
        json["RepostCount"] = RepostCount;
        json["CommentsCount"] = CommentsCount;
        json["FollowersCount"] = FollowersCount;
        json["Date"] = Date.ToString();

        return json;
    }
}
